﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Linq;
using System.IO;
using System.Text;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using webapp4U.BOL;

public partial class Controls_ControlAbout : System.Web.UI.UserControl
{
    string filePath;
    protected void Page_Load(object sender, EventArgs e)
    {
        if (webapp4U.Globals.LangVietNam())
            filePath = Request.PhysicalApplicationPath + "UserUpload/Gioithieu.txt";
        else
            filePath = Request.PhysicalApplicationPath + "UserUpload/Gioithieu_en.txt";

        //List<webapp4U.BOL.Board> obj = webapp4U.BOL.Board.GetAllBoard();
        //rptBoard.DataSource = obj;
        //rptBoard.DataBind();
    }

    public string ReadTextFile()
    {
        if (!System.IO.File.Exists(filePath))
        {
            return "";
        }

        using (StreamReader sr = System.IO.File.OpenText(filePath))
        {
            StringBuilder text = new StringBuilder();
            String input;
            while ((input = sr.ReadLine()) != null)
            {
                text.AppendLine(input);
            }
            sr.Close();
            return text.ToString();
        }
    }

}
